package cn.appsys.mapper.appInfo;

import cn.appsys.pojo.AppInfo;
import cn.appsys.pojo.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AppInfoMapper {
   //后台分页
    public List<AppInfo> getAppInfoList(@Param("softwareName")String softwareName,@Param("flatformId")Integer flatformId,@Param("categoryLevel1") Integer categoryLevel1, @Param("categoryLevel2") Integer categoryLevel2, @Param("categoryLevel3")Integer categoryLevel3, @Param("currPageNo") Integer currPageNo,@Param("pageSize") Integer pageSize);
    //开发者分页查询
    public List<AppInfo> getDevAppInfoList(@Param("softwareName") String softwareName,@Param("appStatus")Integer appStatus, @Param("flatformId") Integer flatformId, @Param("categoryLevel1") Integer categoryLevel1, @Param("categoryLevel2") Integer categoryLevel2, @Param("categoryLevel3") Integer categoryLevel3,@Param("currPageNo") Integer currPageNo,@Param("pageSize") Integer pageSize);
    //后台查询条数
    public int getAppInfoListCout(@Param("softwareName")String softwareName,@Param("flatformId")Integer flatformId,@Param("categoryLevel1") Integer categoryLevel1, @Param("categoryLevel2") Integer categoryLevel2, @Param("categoryLevel3")Integer categoryLevel3);
    //开发者条数
   public int getDevAppInfoListCout(@Param("softwareName") String softwareName,@Param("appStatus")Integer appStatus,@Param("flatformId") Integer flatformId,@Param("categoryLevel1") Integer categoryLevel1,@Param("categoryLevel2") Integer categoryLevel2,@Param("categoryLevel3") Integer categoryLevel3);

    public AppInfo getAppInfo(@Param("appinfoid") int appinfoid);

    /**更新审核状态*/
    public int checkApp(@Param("status") int status,@Param("id") int id);

    /* app上架下架操作  */
    public int putawayApp(@Param("appId") Integer appId,@Param("status")Integer status);

    /* 查询当前app状态 */
    public int appStatus(@Param("appId") Integer appId);

    /*修改app版本号*/
    public int updateAppVersion(@Param("appId") Integer appId,@Param("versionId") Integer versionId);

    /*判断新增app名称是否重复 */
    public int selectApkNameCount(@Param("apkName") String apkName);

    /*新增app信息*/
    public int addAppInfo(@Param("app") AppInfo app);

    /* 更新app信息*/
    public int doAppUpdate(@Param("app") AppInfo app);

    /*删除修改appinfo文件 */
    public int updateFile(@Param("id")int id);

    /*删除app信息*/
    public int delAppInfo(@Param("id")int id);
}
